class School {
  private List<Department> departments;
  private List<Student> students;
  public School() {
   departments = new ArrayList<>();
   students = new ArrayList<>();
  }
  public void addDepartment(Department department) {
    departments.add(department);
  }
  public void addStudent(Student student) {
    students.add(student);
  }
}

class Department {
  private List<Instructor> instructors;
  private List<Subject> subjects;
  public Department() {
    instructors = new ArrayList<>();
    subjects = new ArrayList<>();
  }
  public void addInstructor(Instructor instructor) {
    instructors.add(instructor);
  }
  public void addSubject(Subject subject) {
    subjects.add(subject);
  }
}

class Instructor {
  private String name;
  private List<Subject> subjects;
  public Instructor(String name) {
    this.name = name;
    subjects = new ArrayList<>();
  }
  public void addSubject(Subject subject) {
    subjects.add(subject);
  }
}
class Student {
  private List<Subject> subjects;
  public Student() {
   subjects = new ArrayList<>();
  }
  public void addSubject(Subject subject) {
    subjects.add(subject);
  }
}

class Subject {
  private String name;
  public Subject(String name) {
    this.name = name;
  }
}